﻿using Framework.Core;
using Rhino.Mocks;
using Xunit;

namespace Framework.Wcf.Consumer.Tests
{
    public class ProgramTest
    {
        private readonly MockRepository mockRepository;

        public ProgramTest()
        {
            mockRepository = new MockRepository();
        }

        [Fact]
        public void When_Main_is_running_Then_run_EntryPoint()
        {
            var entryPointMock = mockRepository.StrictMock<IEntryPoint>();

            entryPointMock.Expect(x => x.Run(EnvMode.Prod));

            Program.EntryPoint = entryPointMock;

            Program.Main(new string[] {});
        }
    }
}